package com.tb.dubbo.service.impl;

import com.tb.dubbo.entity.Book;
import com.tb.dubbo.service.BookService;

import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者：tb
 * 描述：todo
 * 日期：Created in 2022/4/6 12:09
 *
 * @Version 1.0
 */
@Service
public class BookServiceImpl implements BookService {
    private List<Book> bookList = new ArrayList<>();
    public BookServiceImpl(){
        bookList.add(new Book());
        System.out.println("创建了图书业务层对象");
    }
    @Override
    public List<Book> findBookList() {
        return bookList;
    }

    @Override
    public void addBook(Book book) {
        bookList.add(book);
    }
}
